﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XmlSockets.Internal
{
    internal struct XmlMessageEnumerator : IEnumerable<XmlMessage>
    {
        internal XmlMessageReader Reader;

        internal XmlMessageEnumerator(XmlMessageReader reader)
        {
            Reader = reader;
        }

        public IEnumerator<XmlMessage> GetEnumerator()
        {
            return Reader;
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return Reader;
        }
    }
}
